package com.example.zk.controller;

import com.example.zk.configure.DataConfigure;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class TestDao {


    @RequestMapping("/demo")
    public String demo() {
        System.out.println("===========");
        JdbcTemplate jdbcTemplate = DataConfigure.getJdbcTemplate();
        int count=jdbcTemplate.queryForObject("SELECT COUNT(*) FROM tb_resume",Integer.class);
        return "当前tb_resume表有"+count+"记录";
    }

}
